#import "ProgramViewController.h"
#import "Cinema.h"
#import "Movie.h"

@interface ProgramViewController ()
@end

@implementation ProgramViewController

-(void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    NSArray* movies = [self.cinema giveMeAllTheMovies];
    int count = 1;
    for (Movie* m in movies) {
        UIButton* but = [[UIButton alloc] initWithFrame:CGRectMake(40, 85 * count++, 160, 40)];
        but.backgroundColor = [UIColor greenColor];
        [but setTitle:m.title forState:UIControlStateNormal];
        [self.view addSubview:but];
    }
}

@end
